<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>5.1 函数</title>
</head>

<body>
    <script>
        function f(x) {
            return 4 * x * x + 3 * x + 2;
        }
        var x = prompt('请输入x');
        alert(f(x));
    </script>
</body>

</html>